from itertools import pairwise
from typing import *


class Solution:

    def canSplitArray(self, nums: List[int], m: int) -> bool:
        if len(nums) < 3:
            return True
        for i in range(1, len(nums)):
            if nums[i] + nums[i - 1] >= m:
                return True
        return False


class Solution:

    def canSplitArray(self, nums: List[int], m: int) -> bool:
        return len(nums) <= 2 or any(x + y >= m for x, y in pairwise(nums))